#pragma once
namespace mylog
{
    // 需要一个类，用来标记日志等级
    class LogLevel
    {
    public:
        enum class Level // 枚举类，装载日志等级
        {
            DEBUG = 0,
            INFO,
            WARN,
            FATAL,
            ERROR,
            OFF
        };
        static const char *ToString(LogLevel::Level level)
        {
            switch (level)
            {
            case Level::DEBUG:
                return "DEBUG";
            case Level::INFO:
                return "INFO";
            case Level::WARN:
                return "WARN";
            case Level::FATAL:
                return "FATAL";
            case Level::OFF:
                return "OFF";
            case Level::ERROR:
                return "ERROR";
            }
            return "UNKONW";
        }
    };
} // namespace mylog
